var infoClient;
/*type = "etu" ou "prof"*/
function InfoClient(id){
    this.id = id;
    this.nom = "";
    this.prenom = "";
    this.type = "";
    this.documentOuvert = "";
}


function init(id){
    $.ajax({
      type: "GET",
      url: "JSP/init.jsp",
      data: "id="+id,
      success:afficheUE});
}
function searchTD(idUE){
    $.ajax({
      type: "GET",
      url: "JSP/td.jsp",
      data: "nomUE="+idUE,
      success:function(content){
                afficheTD(content,idUE);
      }
      });
}
function getDoc(idDoc){
    $.ajax({
      type: "GET",
      url: "JSP/affiche.jsp",
      data: "codeDoc="+idDoc,
      success:function(content){
                visionneDoc(content,idDoc);
      }
      });
}
function searchExo(idTD){
  $.ajax({
      type: "GET",
      url: "JSP/exo.jsp",
      data: "nomTd="+idTD,
      success:function(content){
                afficheExo(content,idTD);
      }
      });
}

function setDoc(idDoc,contenu){
  $.ajax({
      type: "POST",
      url: "JSP/affiche.jsp",
      data: "codeDoc="+idDoc+"&contenu="+contenu,
      success:function(content){
                afficheExo(content,idDoc);
      }
      });
}